﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
namespace Admin.NET.Application.Entity;

/// <summary>
/// 产品
/// </summary>
[SugarTable("iotproduct","产品")]
[Tenant("1300000000001")]
public class IotProduct  : EntityBase
{
    /// <summary>
    /// 产品名称
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "ProductName", ColumnDescription = "产品名称", Length = 64)]
    public string ProductName { get; set; }
    
    /// <summary>
    /// 协议编号
    /// </summary>
    [SugarColumn(ColumnName = "ProtocolCode", ColumnDescription = "协议编号", Length = 64)]
    public string? ProtocolCode { get; set; }
    
    /// <summary>
    /// 产品分类ID
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "CategoryId", ColumnDescription = "产品分类ID")]
    public long CategoryId { get; set; }
    
    /// <summary>
    /// 产品分类名称
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "CategoryName", ColumnDescription = "产品分类名称", Length = 64)]
    public string CategoryName { get; set; }
    
    /// <summary>
    /// 是否系统通用（0-否，1-是）
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "IsSys", ColumnDescription = "是否系统通用（0-否，1-是）")]
    public int IsSys { get; set; }
    
    /// <summary>
    /// 是否启用授权码（0-否，1-是）
    /// </summary>
    [Required]
    [SugarColumn(ColumnName = "IsAuthorize", ColumnDescription = "是否启用授权码（0-否，1-是）")]
    public int IsAuthorize { get; set; }
    
    /// <summary>
    /// mqtt账号
    /// </summary>
    [SugarColumn(ColumnName = "MqttAccount", ColumnDescription = "mqtt账号", Length = 64)]
    public string? MqttAccount { get; set; }
    
    /// <summary>
    /// mqtt密码
    /// </summary>
    [SugarColumn(ColumnName = "MqttPassword", ColumnDescription = "mqtt密码", Length = 64)]
    public string? MqttPassword { get; set; }
    
    /// <summary>
    /// 产品秘钥
    /// </summary>
    [SugarColumn(ColumnName = "MqttSecret", ColumnDescription = "产品秘钥", Length = 64)]
    public string? MqttSecret { get; set; }
    
    /// <summary>
    /// 状态（1-未发布，2-已发布）
    /// </summary>
    [SugarColumn(ColumnName = "status", ColumnDescription = "状态（1-未发布，2-已发布）")]
    public bool? status { get; set; }
    
    /// <summary>
    /// 物模型JSON（属性、功能、事件）
    /// </summary>
    [SugarColumn(ColumnName = "ThingsModelsJson", ColumnDescription = "物模型JSON（属性、功能、事件）")]
    public object? ThingsModelsJson { get; set; }
    
    /// <summary>
    /// 设备类型（1-直连设备、2-网关设备、3-监控设备）
    /// </summary>
    [SugarColumn(ColumnName = "DeviceType", ColumnDescription = "设备类型（1-直连设备、2-网关设备、3-监控设备）")]
    public int? DeviceType { get; set; }
    
    /// <summary>
    /// 联网方式（1=wifi、2=蜂窝(2G/3G/4G/5G)、3=以太网、4=其他）
    /// </summary>
    [SugarColumn(ColumnName = "NetworkMethod", ColumnDescription = "联网方式（1=wifi、2=蜂窝(2G/3G/4G/5G)、3=以太网、4=其他）")]
    public int? NetworkMethod { get; set; }
    
    /// <summary>
    /// 认证方式（1-简单认证、2-加密认证、3-简单+加密）
    /// </summary>
    [SugarColumn(ColumnName = "VertificateMethod", ColumnDescription = "认证方式（1-简单认证、2-加密认证、3-简单+加密）")]
    public int? VertificateMethod { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnName = "Remark", ColumnDescription = "备注", Length = 500)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 产品支持的传输协议
    /// </summary>
    [SugarColumn(ColumnName = "Transport", ColumnDescription = "产品支持的传输协议", Length = 64)]
    public string? Transport { get; set; }
    
    /// <summary>
    /// 创建者部门Id
    /// </summary>
    [SugarColumn(ColumnName = "CreateOrgId", ColumnDescription = "创建者部门Id")]
    public long? CreateOrgId { get; set; }
    
    /// <summary>
    /// 创建者部门名称
    /// </summary>
    [SugarColumn(ColumnName = "CreateOrgName", ColumnDescription = "创建者部门名称", Length = 64)]
    public string? CreateOrgName { get; set; }
    
}
